---
image: {{ .ModuleName }}/{{ .ImageName }}
fromImage: common/shell-operator
import:
  - artifact: yq4-artifact
    add: /usr/local/bin/yq
    to: /usr/local/bin/yq
    before: install
  - artifact: semver-artifact
    add: /usr/local/bin/semver
    to: /usr/local/bin/semver
    before: setup
  - image: prometheus/prometheus
    add: /bin/promtool
    to: /usr/local/bin/promtool
    before: setup
  - image: common/shell-operator
    add: /shell-operator
    to: /shell-operator
    before: setup
  - artifact: tini-artifact
    add: /tini/tini-static
    to: /sbin/tini
    before: setup
  - artifact: {{ $.ModuleName }}/{{ $.ImageName }}-binaries-artifact
    add: /relocate
    to: /
    before: setup
    includePaths:
      - '**/*'
  - artifact: {{ $.ModuleName }}/{{ $.ImageName }}-binaries-artifact
    add: /usr/lib/python3
    to: /usr/lib/python3
    before: setup
  - artifact: {{ $.ModuleName }}/{{ $.ImageName }}-binaries-artifact
    add: /usr/lib64/python3
    to: /usr/lib64/python3
    before: setup
  - artifact: {{ $.ModuleName }}/{{ $.ImageName }}-binaries-artifact
    add: /usr/lib64/python3.9
    to: /usr/lib64/python3.9
    before: setup
git:
- add: /{{ .ModulePath }}
  to: /available_hooks
  includePaths:
  - 'modules/*/webhooks/'
  - 'ee/modules/*/webhooks/'
# - 'ee/fe/modules/*/webhooks/'
- add: /{{ .ModulePath }}modules/002-deckhouse/images/webhook-handler/entrypoint.sh
  to: /entrypoint.sh
- add: /{{ .ModulePath }}shell_lib/semver.sh
  to: /{{ .ModulePath }}frameworks/shell/semver.sh
- add: /{{ .ModulePath }}python_lib
  to: /frameworks/python
docker:
  ENV:
    PYTHONPATH: /frameworks/python
  ENTRYPOINT: ["/entrypoint.sh"]

---
{{- $pythonBinaries := "/usr/bin/python3" }}
artifact: {{ $.ModuleName }}/{{ $.ImageName }}-binaries-artifact
from: {{ $.Images.BASE_ALT_DEV }}
shell:
  setup:
    - /binary_replace.sh -i "{{ $pythonBinaries }}" -o /relocate
